package com.sprite.htr.spritehtr.view;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;

/**
 * Created by admin on 2017/7/1.
 */


    public class BaseView {
        protected View view;
        protected Context context;

        public BaseView(Context context){
            this.context = context;
        }


        protected void initUI(){
        }

        protected void setContentView(int layout){
            view = LayoutInflater.from(context).inflate(layout, null);//将布局文件转换为View对象
        }

        protected View findViewById(int id){
            return view.findViewById(id);
        }

        public View getView(){
            return view;
        }
    }

